package scau.hotel.hotel_service.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class GetPriceVo {
    /**
     * 房间id
     */
    private Integer roomId;
    /**
     * 入住时间
     */
    @NotNull(message = "入住时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd hh:mm:ss")
    private Date checkinDate;
    /**
     * 预计退房时间
     */
    @NotNull(message = "预计退房时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd hh:mm:ss")
    private Date checkoutDate;
    /**
     * 押金
     */
    @Digits(integer = 9, fraction=2, message = "押金格式不正确")
    @DecimalMin(value = "0.00", message = "押金须为正整数")
    @NotNull(message = "押金不能为空")
    private BigDecimal cashPledge;
    /**
     * 支付方式
     */
    @NotNull(message = "支付方式不能为空")
    private String payWay;
    /**
     * 备注
     */
    private String remark;

    /**
     * 待入住人信息数组
     */
    @NotNull(message = "请勾选入住人")
    private List<CheckinCusInforVo> multipleSelection;
}
